package net.wantongtech.xa.uploadbasicinfo.vo.migrate;

import lombok.Data;
import org.joda.time.LocalDate;

/**
 * 表分区信息
 *
 * @author MaShibo
 * 2021/3/10 0010
 */
@Data
public class TabPartition {


    private String partitionName;

    private String highValue;

    private Integer partitionPosition;

    private LocalDate belongDate;

    private Integer dataCount;

    public LocalDate getBelongDate() {
        if (highValue != null) {
            belongDate = LocalDate.parse(highValue).minusDays(1);
        }
        return belongDate;
    }
}
